package com.woniuxy.carlife.carlifeuserweb.service;

import com.woniuxy.carlife.carlifecommonsweb.exception.CarlifeGlobalException;
import com.woniuxy.carlife.carlifeusermodel.dto.FavoritesDto;
import com.woniuxy.carlife.carlifeusermodel.param.FavoritesParam;
import com.woniuxy.carlife.carlifeusermodel.param.Prodectfavoritesparam;
import com.woniuxy.carlife.carlifeuserweb.entity.Prodectfavorites;
import com.baomidou.mybatisplus.extension.service.IService;
import io.swagger.models.auth.In;

import java.util.List;

/**
 * @author zjq
 * @ClassName:ProdectfavoritesService
 * @Description:商品收藏
 * @date 2021/4/6 20:02
 **/

public interface ProdectfavoritesService extends IService<Prodectfavorites> {

    /*
     * 功能描述〈根据用户id查询收藏的商品〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/12 13:16
     * @throws
     */

    public List<Prodectfavorites> findProdectfavoritesByUserId(Integer userId) ;


    /*
     * 功能描述〈查询所有收藏〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/12 14:44
     * @throws
     */

    public List<FavoritesDto> findFavoritesByUserId(Integer userId);


    /*
     * 功能描述〈删除商品收藏〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/14 14:29
     * @throws
     */

    public boolean deleteProdectfavoritesByProductfavoritesId(Integer productfavoritesId);



    /*
     * 功能描述〈删除收藏〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/14 15:21
     * @throws
     */

    public boolean deleteFavorites(FavoritesParam favoritesParam,Integer tokenUserId);


    /*
     * 功能描述〈据用户id新增收藏的商品〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/14 18:43
     * @throws
     */

    public Boolean addProdectfavoritesByUserid(Prodectfavorites prodectfavorites);


    /*
     * 功能描述〈统计商品收藏数量〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/15 16:46
     * @throws
     */
    public Integer prodectfavoritesTotalByUserId(Integer userId);

}
